import { SysSyncComponent } from './../components/fields/sys-sync/sys-sync.component';
import { OfficeToolComponent } from './../components/fields/office-tool/office-tool.component';
import { AddressBookComponent } from './../components/fields/address-book/address-book.component';
import { TaskTopBarComponent } from './../components/fields/task-top-bar/task-top-bar.component';
import { PlaceSelectComponent } from './../components/fields/place-select/place-select.component';
import { ShortMessageComponent } from './../components/fields/short-message/short-message.component';
import { TaskMemberComponent } from './../components/fields/task-member/task-member.component';
import { DocAssemblyComponent } from './../components/fields/doc-assembly/doc-assembly.component';
import { BidEvaluationComponent } from './../components/fields/bid-evaluation/bid-evaluation.component';
import { FunctionButtonComponent } from './../components/fields/function-button/function-button.component';
import { BidOpeningCeremonyComponent } from './../components/fields/bid-opening-ceremony/bid-opening-ceremony.component';
import { BidOpeningComponent } from './../components/fields/bid-opening/bid-opening.component';
import { FileMakerComponent } from './../components/fields/file-maker/file-maker.component';
import { SearchBarComponent } from './../components/fields/search-bar/search-bar.component';
// import { TextAreaComponent } from './../components/fields/text-area/text-area.component';
import { BaseMapTool } from './base-map-tool';
import { Type } from '@angular/core';
import {
  AddressSelectComponent,
  InputTextComponent,
  LabelTextComponent,
  SelectComponent,
  DateComponent,
  StartEndDateComponent,
  ProjectNumberComponent,
  BaseTableComponent,
  RmbCapitalizeComponent
} from '../components/fields';
import { FilesComponent } from '../components/fields/files/files.component';
import { SpaceOccupyingComponent } from '../components/fields/space-occupying/space-occupying.component';
import { AutoFormComponent } from '../components/fields/auto-form/auto-form.component';
import { AuditComponent } from '../components/fields/audit/audit.component';
import { ColumnTableComponent } from '../components/fields/column-table/column-table.component';
import { TabsComponent } from '../components/fields/tabs/tabs.component';
import { CrossLineComponent } from '../components/fields/cross-line/cross-line.component';
import { ChartRadarComponent } from '../components/fields/chart-radar/chart-radar.component';
import { ChartHistogramComponent } from '../components/fields/chart-histogram/chart-histogram.component';
import { ChartPieComponent } from '../components/fields/chart-pie/chart-pie.component';
import { EarlyWarningComponent } from '../components/fields/early-warning/early-warning.component';
import { CalendarMemoComponent } from '../components/fields/calendar-memo/calendar-memo.component';
import { TaskNotificationComponent } from '../components/fields/task-notification/task-notification.component';

const RENDER_ITEM_MAP: { key: string; component: Type<any> }[] = [
  { key: 'input-text', component: InputTextComponent },
  { key: 'label-text', component: LabelTextComponent },
  { key: 'select', component: SelectComponent },
  { key: 'address-select', component: AddressSelectComponent },
  { key: 'base-table', component: BaseTableComponent },
  { key: 'rmb-capitalize', component: RmbCapitalizeComponent },
  { key: 'start-end-date', component: StartEndDateComponent },
  { key: 'project-number', component: ProjectNumberComponent },
  { key: 'files-upload', component: FilesComponent },
  { key: 'single-date', component: DateComponent },
  { key: 'tabs', component: TabsComponent },
  // { key: 'memo', component: MemoComponent },
  // { key: 'information', component: InformationComponent },
  // { key: 'text-area', component: TextAreaComponent },
  { key: 'search-bar', component: SearchBarComponent },
  { key: 'audit', component: AuditComponent },
  { key: 'space-occupying', component: SpaceOccupyingComponent },
  { key: 'auto-form', component: AutoFormComponent },
  { key: 'column-table', component: ColumnTableComponent },
  { key: 'file-maker', component: FileMakerComponent },
  { key: 'bid-opening', component: BidOpeningComponent },
  { key: 'dividing-line', component: CrossLineComponent },
  { key: 'bid-opening-ceremony', component: BidOpeningCeremonyComponent },
  { key: 'button-group', component: FunctionButtonComponent },
  { key: 'chart-radar', component: ChartRadarComponent },
  { key: 'chart-pie', component: ChartPieComponent },
  { key: 'chart-strip', component: ChartHistogramComponent },
  { key: 'bid-evaluation', component: BidEvaluationComponent },
  { key: 'doc-assembly', component: DocAssemblyComponent },
  { key: 'task-member', component: TaskMemberComponent },
  { key: 'early-warning', component: EarlyWarningComponent },
  { key: 'short-message', component: ShortMessageComponent },
  { key: 'place-select', component: PlaceSelectComponent },
  { key: 'task-top-bar', component: TaskTopBarComponent },
  { key: 'calendar-memo', component: CalendarMemoComponent },
  { key: 'task-notification', component: TaskNotificationComponent },
  { key: 'address-book', component: AddressBookComponent },
  { key: 'office-tool', component: OfficeToolComponent },
  { key: 'sys-sync', component: SysSyncComponent }
];

export class ComponentMapTool extends BaseMapTool {
  static current: ComponentMapTool = new ComponentMapTool();
  constructor() {
    super();
    this.renderItemMap = RENDER_ITEM_MAP;
  }
}
